/**
 * Copyright &copy; 2012-2016 civet All rights reserved.
 */
package cn.mcsys.myadmin.modules.air.dao;

import cn.mcsys.myadmin.common.persistence.CrudDao;
import cn.mcsys.myadmin.common.persistence.annotation.MyBatisDao;
import cn.mcsys.myadmin.modules.air.entity.AirCarRecord;
import cn.mcsys.myadmin.modules.air.entity.AirDispatchLog;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 车辆状态DAO接口
 * @author leopold
 * @version 2018-08-13
 */
@MyBatisDao
public interface AirCarRecordDao extends CrudDao<AirCarRecord> {

    List<AirCarRecord> getAirCarRecordToday();

    AirCarRecord selectLatestCarRecord(@Param("id") Integer id, @Param("status") Integer status);

    List<AirCarRecord> getAirCarRecordLeast();

    List<AirCarRecord> getAirCarRecordInTime(@Param("formatDate") String formatDate,@Param("airRidePointId") Integer airRidePointId);

    List<AirCarRecord> getLeastRecordByStatusAndPointId(@Param("airRidePointId") Integer airRidePointId,@Param("status") Integer status);

    AirCarRecord selectLatestCarRecordWithDate(@Param("id")Integer id, @Param("status")int status, @Param("recordDate")Date recordDate);

    List<AirCarRecord> getRecordTodayByPointId(Integer airRidePointId);

    Integer selectPointArriveSum(@Param("pointName") String pointName,@Param("date") String date);

    List<AirCarRecord> getRecordsByPointIdAndDate(@Param("id")Integer id,@Param("date") Date date);

    List<AirCarRecord> getCarRecord(@Param("carid") Long carid, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
}